package com.example.easyexcel.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Getter
@Setter
@EqualsAndHashCode
public class DemoData {
    @ExcelProperty("字符串标题")
    private String string;
    @ExcelProperty("日期标题")
    private Date date;
    @ExcelProperty("数字标题")
    private Double doubleData;
    /**
     * 忽略这个字段
     */
    @ExcelIgnore
    private String ignore;
}

// 最简单的写，参考 https://easyexcel.opensource.alibaba.com/docs/current/quickstart/write#%E6%9C%80%E7%AE%80%E5%8D%95%E7%9A%84%E5%86%99
// 根据参数只导出指定列，参考 https://easyexcel.opensource.alibaba.com/docs/current/quickstart/write#%E6%A0%B9%E6%8D%AE%E5%8F%82%E6%95%B0%E5%8F%AA%E5%AF%BC%E5%87%BA%E6%8C%87%E5%AE%9A%E5%88%97